﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Administrator/MasterPage.master" AutoEventWireup="false" CodeFile="frmZone.aspx.vb" Inherits="Administrator_frmZone" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table style="width: 100%; height: 100%;">
                <tr>
                    <td align="right" width="150">
                        <asp:Label ID="lblDept" runat="server" CssClass="control"></asp:Label>
                    </td>
                    <td align="left" style="height: 26px">
                        <asp:DropDownList ID="ddlDepartment" runat="server" CssClass="control" 
                            Height="25px" Width="290px">
                        </asp:DropDownList>
                    </td>
                    
                </tr>
                <tr>
                    <td align="right" style="height: 24px">
                        <asp:Label ID="lblZoneCode" runat="server" CssClass="control"></asp:Label>
                    </td>
                    <td align="left" style="height: 24px">
                        <asp:TextBox ID="txtZoneCode" runat="server" AutoCompleteType="Disabled" 
                            CssClass="control" Height="20px" MaxLength="5" Width="170px"></asp:TextBox>
                    </td>
                  
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="lblZoneName" runat="server" CssClass="control"></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtZoneName" runat="server" AutoCompleteType="Disabled" 
                            CssClass="control" Height="20px" MaxLength="200" Width="315px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        &nbsp;</td>
                    <td align="left" style="text-align: right">
                        <asp:Button ID="btnSearch" runat="server" CssClass="control" Text="search" 
                            Width="80px" />
                        <asp:Button ID="btnAdd" runat="server" CssClass="control" Text="Add" 
                            Width="80px" />
                        <asp:Button ID="btnModify" runat="server" CssClass="control" Text="Modify" 
                            Width="80px" />
                        <asp:Button ID="btnDelete" runat="server" CssClass="control" Text="Delete" 
                            Width="80px" />
                        <asp:Button ID="btnClear" runat="server" CssClass="control" Text="Clear" 
                            Width="80px" />
                        <asp:Button ID="btnPrint" runat="server" CssClass="control" Text="Print" 
                            Width="80px" />
                    </td>
                </tr>
            </table>
           <div align="center">

        <asp:Label ID="lblMsg" runat="server" CssClass="control" Font-Size="XX-Large" 
                        ForeColor="Red" Height="30px" style="text-align: center" 
                   Font-Bold="True"></asp:Label>

            <asp:GridView ID="gvZone" runat="server" AllowSorting="True" 
                AutoGenerateColumns="False" CellPadding="4" CssClass="control" 
                ForeColor="#333333" Width="100%" AllowPaging="True">
                <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                <FooterStyle BackColor="White" Font-Bold="True" ForeColor="#333333" />
                <RowStyle ForeColor="#333333" />
                <PagerSettings Mode="NumericFirstLast" />
                <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" 
                    CssClass="cssPager" />
                <SelectedRowStyle BackColor="#FFFFCC" Font-Bold="True" ForeColor="Navy" />
                <HeaderStyle BackColor="#E38120" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:CommandField ButtonType="Image" 
                        SelectImageUrl="~/img/icon/select_icon.gif" ShowSelectButton="True">
                    <ItemStyle Width="3%" />
                    </asp:CommandField>
                    <asp:BoundField DataField="ZoneCode" HeaderText="รหัสเขต" ReadOnly="True" 
                        SortExpression="ZoneCode">
                    <ItemStyle HorizontalAlign="Center" Width="12%" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ZoneName" HeaderText="ชื่อเขต" ReadOnly="True" 
                        SortExpression="ZoneName">
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="ฝ่าย" SortExpression="deptCode">
                        <ItemTemplate>
                            <asp:HiddenField ID="hdfDeptCode" runat="server" 
                                Value='<%# eval("deptCode") %>' />
                            <asp:Label ID="lblDeptName" runat="server" Text='<%# eval("deptName") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            </div>
            <div align="right">
                <asp:Label ID="lblTotal" runat="server" Font-Bold="True" ForeColor="#003300"></asp:Label>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

